﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo3
{
    class Square:Shape
    {
        private int sideLen;

        public override void GetArea()
        {
            Console.WriteLine("请输入正方形的边长：");
            sideLen = int.Parse(Console.ReadLine());
            Console.WriteLine("正方形的面积为：{0}", (this.sideLen * this.sideLen));
        }

        public int SideLen
        {
            get { return this.sideLen; }
            set { this.sideLen = value; }
        }
    }
}
